#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QtNetwork>
#include "networkaccessmanager.h"

namespace Ui {
    class Widget;
}

class Widget : public QWidget {
    Q_OBJECT
public:
    Widget(QWidget *parent = 0);
    ~Widget();

protected:
    void changeEvent(QEvent *e);

private:
    Ui::Widget *ui;
    NetworkAccessManager *nam;
    QUrl m_url;
    QNetworkRequest m_request;
    QNetworkReply *m_reply;
    void saveRawHeaders();

private slots:
    void on_pushButton_clicked();
    void update();
    void replyReadyRead();
    void replyFinished();
};

#endif // WIDGET_H
